package _0816;
import java.io.*;
public class test3 {
    public static void main(String[] args) {
        File dir = new File(".");
        File[] subs = dir.listFiles();
        for (File sub : subs) {
            if (sub.isFile() && sub.getName().endsWith(".boj")) {
                try (FileInputStream fis = new FileInputStream(sub);
                     ObjectInputStream ois = new ObjectInputStream(fis);
                ) {
                    Object obj = ois.readObject();
                    if (obj instanceof User) {
                        System.out.println(obj);
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
